package com.itheima.Homework;
/*
 *
 * 现有一个文件，将其拷贝到另外一个文件夹下
 * */

import java.io.*;

public class Three {
    public static void main(String[] args) throws IOException {

        FileReader f1 = new FileReader("E:\\ideaProject\\basic-code\\day12\\a.txt");
        BufferedReader b1 = new BufferedReader(f1);
        FileWriter f2 = new FileWriter("E:\\ideaProject\\basic-code\\day12\\b.txt");
        BufferedWriter b2 = new BufferedWriter(f2);

        char[] c = new char[1024];
        int d;
        while ((d = b1.read(c)) != -1) {

            b2.write(c,0, d );
        }

        b2.flush();
        b2.close();
        b1.close();


    }
}
